package com.lhz.project.system.mapper.auth;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhz.common.page.BaseQueryParam;
import com.lhz.project.system.model.entity.auth.Role;
import com.lhz.project.system.model.param.auth.RoleParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LiHuaZhi
 * @since 2020-06-20 13:42:57
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    Role selectByPrimaryKey(Integer id);

    /**
     * 查询列表
     *
     * @param param
     * @return
     */
    List<Role> listRole(BaseQueryParam param);

    /**
     * 物理删除
     *
     * @param id
     * @return
     */
    int deletePhyByPrimaryKey(Integer id);

    /**
     * 物理删除
     *
     * @param list
     * @return
     */
    int deletePhyByPrimaryKeys(@Param("list") List<Integer> list);

    /**
     * 简称重复
     *
     * @param param
     * @return
     */
    int checkNameAndCode(RoleParam param);

    /**
     * 查询所有
     *
     * @return
     */
    List<Role> listAll();
}